import request from '@/utils/request';
import qs from 'qs'
export const getList = (current, size, params) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/listbylike',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/submit',
    method: 'post',
    data: row
  })
}

export const saveOrUpdateTechnology = (row) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/saveOrUpdateTechnology',
    method: 'post',
    data: row
  })
}

export const memberRecommend = (param) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/memberRecommend',
    method: 'post',
    data:JSON.stringify(param),
    headers:{
      'Content-Type': 'application/json;charset=UTF-8' //必须设置传输方式
    }
  })
}

export const technologyPatentList = (technologyId) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/technologyPatentList',
    method: 'get',
    params: {
      technologyId
    }
  })
}

export const removeTechnologyPatent = (technologyPatentId) => {
  return request({
    url: '/api/shqdy-admin/membertechnology/removeTechnologyPatent',
    method: 'get',
    params: {
      technologyPatentId
    }
  })
}